#!/usr/bin/python2.7

N = int(raw_input('Enter size: '))
isPrime = [1] * N
for i in xrange(2, N+1):
    for j in xrange(2, N/i + 1):
        isPrime[i*j - 1] = 0
primeList = [i+1 for i in range(1, len(isPrime)) if isPrime[i] == 1]
print primeList